#File Name:
#Author:chenjiajun
#Date:2025/7/28
from urllib import request

# from flask import Flask, request
# #标准化返回
# from lib.resp import responseFunc
#
# app = Flask(__name__)
#
# @app.route('/login', methods=['POST','GET'])
# def login():
#     username = request.json.get('username')
#     passwd = request.json.get('passwd')
#     if username == 'root' and passwd == '123456':
#         return responseFunc()
#     else:
#         return responseFunc(message='账号或密码错误!', code=1)
#
# app.run(debug=True)

from flask import Flask, render_template,request
app = Flask(__name__)
@app.route('/',methods=['GET','POST'])
def index():
    #render_template 页面渲染函数
    return render_template("index.html")

@app.route('/login',methods=['GET','POST'])
def login():
    # username = request.args['username']
    # password = request.args['password']
    # print(username,password)
    name = 'sc'
    return render_template("login.html",name=name)

app.run(debug=True)